﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserList.aspx.cs" Inherits="System_User_UserList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>正贸仓储物流管理系统</title>
    <link href="../../css/css.css" rel="stylesheet" type="text/css" />

    <script src="../../js/Validate.js"></script>
    <script type="text/javascript" src="../../JS/jquery-1.10.2.js"></script>
    <script type="text/javascript" language="javascript">
    <!--
    function SelectAllCheckBox() {
        var form = document.forms[0];
        for (i = 0; i < form.elements.length; i++) {
            if (form.elements[i].checked == false) {
                j = 0;
            }
            else {
                j = 1;
            }
        }
        if (j == 0) {
            for (i = 0; i < form.elements.length; i++) {
                form.elements[i].checked = true;
            }
        }
        else {
            for (i = 0; i < form.elements.length; i++) {
                form.elements[i].checked = false;
            }
        }
 
    }

    function OpenUserListAdd() {

         //document.getElementById('<%=hidden.ClientID %>').value = window.showModalDialog("UserListAdd.aspx?Mode=Add", window, "dialogWidth=600px;dialogHeight=234px;scroll:no;resizable:no;status:0;");
        window.open("UserListAdd.aspx?Mode=Add", 'win', "Height=230px,Width=600px,top=180, left=500, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no");
        document.URL = location.href;
        }

        $(function () {
            $('#gvUser input[type=checkbox]').click(function () {
                if ($(this).attr('checked') == undefined || $(this).attr('checked') == false) {
                    $(this).attr('checked', true).parent().parent().siblings('tr').find('input[type=checkbox]').attr('checked', false);
                }
                else {
                    $(this).attr('checked', false);
                }
            });
        });
        //-->
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <div>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td style="height: 30px">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td style="background-image: url(../../images/tab_03.gif); background-repeat: repeat-x; width: 12px;">&nbsp;
                                </td>
                                <td style="background-image: url(../../images/tab_05.gif); background-repeat: repeat-x; height: 30px;">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td style="width: 46%; vertical-align: middle;">
                                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                        <td style="width: 5%; vertical-align: middle;">
                                                            <img src="../../images/tb.gif" width="16" height="16" />
                                                        </td>
                                                        <td style="width: 95%;">
                                                            <span>你当前的位置</span>：系统管理-用户列表
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td width="54%"></td>
                                        </tr>
                                    </table>
                                </td>
                                <td width="16" style="background-image: url(../../images/tab_07.gif); height: 30px;">&nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td style="background-image: url(../../images/tab_12.gif); width: 8px;">&nbsp;
                                </td>
                                <td>
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border: 1px solid #b5d6e6;">
                                        <tr>
                                            <td style="padding: 2px;">
                                                <table width="100%" cellspacing="0" cellpadding="0" style="border-bottom: 1px solid #b5d6e6;" >
                                                    <tr style="height: 22px;">
                                                        <td style="width: 5%" align="right">用户编号：
                                                        </td>
                                                        <td style="width: 8%; padding-left: 2px;">
                                                            <asp:TextBox ID="txtvUserNo" runat="server" Style="width: 100px; height: 14px; border: solid 1px #b5d6e6; font-size: 9pt;"></asp:TextBox>
                                                        </td>
                                                        <td style="width: 5%" align="right">用户名称：
                                                        </td>
                                                        <td style="width: 8%; padding-left: 2px;">
                                                            <asp:TextBox ID="txtvUserName" runat="server" Style="width: 100px; height: 14px; border: solid 1px #b5d6e6; font-size: 9pt;"></asp:TextBox>
                                                        </td>
                                                        <td style="width: 8%" align="right">部门编号/名称：
                                                        </td>
                                                        <td style="width: 8%; padding-left: 2px;">
                                                            <asp:TextBox ID="txtvDept" runat="server" Style="width: 100px; height: 14px; border: solid 1px #b5d6e6; font-size: 9pt;"></asp:TextBox>
                                                        </td>
                                                        <td style="width: 20%; padding-left: 2px;">
                                                            <asp:ImageButton ID="ibtnSubmit" runat="server" ImageUrl="~/Images/btn/btn_add.gif"
                                                                OnClientClick="OpenUserListAdd()" />
                                                            <asp:ImageButton ID="ibtnDel" runat="server" ImageUrl="~/Images/btn/Delete.gif" OnClientClick="return confirm('确定删除吗？')"
                                                                OnClick="ibtnDel_Click" />
                                                            <asp:ImageButton ID="btnLogout" runat="server" ImageUrl="~/Images/btn/btn_Audit.gif"
                                                                OnClientClick="return confirm('确定审核吗？')" OnClick="btnLogout_Click" Visible="false" />
                                                            <asp:ImageButton ID="ibtnQuery" runat="server" ImageUrl="~/Images/btn/btn_Search.gif"
                                                                OnClick="ibtnQuery_Click" />
                                                            <asp:ImageButton ID="ibtnReset" runat="server" ImageUrl="~/Images/btn/btn_Reset.gif"
                                                                OnClick="ibtnReset_Click" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr style="height: 672px;" valign="top">
                                            <td style="padding: 2px">
                                                <asp:GridView ID="gvUser" runat="server" AutoGenerateColumns="False" Width="100%"
                                                    BorderWidth="1px" BorderColor="#B5D6E6" CellPadding="0" DataKeyNames="PID" OnRowDataBound="gvUser_RowDataBound">
                                                    <Columns>
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>
                                                               <%-- <input id="hchkSelect" type="checkbox" />--%>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chkSelect" runat="server" />
                                                            </ItemTemplate>
                                                            <ItemStyle Width="5%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="序号">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LabNumber" runat="server" Text="<%#Container.DataItemIndex+1%>"></asp:Label>
                                                            </ItemTemplate>
                                                            <ItemStyle Width="5%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="用户编号">
                                                            <EditItemTemplate>
                                                                <asp:TextBox ID="txt_vUserNo" runat="server" Text='<%# Bind("vUserNo") %>'></asp:TextBox>
                                                            </EditItemTemplate>
                                                            <ItemTemplate>
                                                                <asp:LinkButton ID="lbtn_vUserNo" runat="server" Text='<%# Bind("vUserNo") %>' ForeColor="Blue"
                                                                    CommandArgument='<%# Bind("vUserNo") %>'></asp:LinkButton>
                                                                 <%-- <asp:Label ID="lbtn_vUserNo" runat="server" Text='<%# Bind("vUserNo") %>'></asp:Label>--%>
                                                            </ItemTemplate>
                                                            <ItemStyle Width="20%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="用户名称">
                                                            <EditItemTemplate>
                                                                <asp:TextBox ID="txt_vUserName" runat="server" Text='<%# Bind("vUserName") %>'></asp:TextBox>
                                                            </EditItemTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="lab_vUserName" runat="server" Text='<%# Bind("vUserName") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <ItemStyle Width="30%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="部门名称">
                                                            <EditItemTemplate>
                                                                <asp:TextBox ID="txt_vDepartment" runat="server" Text='<%# Bind("vDepartment") %>'></asp:TextBox>
                                                            </EditItemTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="lab_vDepartment" runat="server" Text='<%# Bind("vDepartment") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <ItemStyle Width="30%" />
                                                        </asp:TemplateField>
                                                        <asp:BoundField HeaderText="是否有效" DataField="iUserStatus">
                                                            <ItemStyle Width="10%" />
                                                        </asp:BoundField>
                                                    </Columns>
                                                    <HeaderStyle HorizontalAlign="Center" CssClass="gvHeader" />
                                                    <RowStyle CssClass="gvRow" HorizontalAlign="Center" />
                                                </asp:GridView>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td style="background-image: url(../../images/tab_15.gif); width: 8px;">&nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td style="background-image: url(../../images/tab_19.gif); height: 35px;">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td style="width: 12px; height: 35px;">
                                    <img src="../../images/tab_18.gif" width="12" height="35" />
                                </td>
                                <td>&nbsp;
                                </td>
                                <td width="16">
                                    <img src="../../images/tab_20.gif" width="16" height="35" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <asp:HiddenField ID="hidden" runat="server" />
        </div>
    </form>
</body>
</html>
